package requests

// 用户模块相关结构体

// 密码修改
type UserEditPasswordRequest struct {
	Id         int64  `gorm:"column:id;" json:"id" validate:"required" filter:"trim"`                                           //用户ID
	Password   string `gorm:"column:password;" json:"password" validate:"required|eqField:RePassword" label:"密码" filter:"trim"` //新密码
	RePassword string `gorm:"-" json:"rePassword" validate:"required" label:"确认密码" filter:"trim"`                               //确认密码
}

// 新建用户
type UserCreateRequest struct {
	Username string `gorm:"column:username;" json:"username" validate:"required|maxLen:30" label:"用户名" filter:"trim"`
	Phone    string `gorm:"column:phone;" json:"phone" validate:"cnMobile" label:"手机号" filter:"trim"`
	Password string `gorm:"column:password;" json:"password" validate:"required|maxLen:20|minLen:6|alphaDash" label:"密码" filter:"trim"`
}

// 用户登录
type UserLoginPasswordRequest struct {
	Username string `gorm:"column:username;" json:"username" validate:"required" label:"用户名" filter:"trim"` //用户名
	Password string `gorm:"column:password;" json:"password" validate:"required" label:"密码" filter:"trim"`  //登录密码
}
